<template>
  <div class="hello">
    hello world
    {{name}} {{age}} {{otherInfo}}
  </div>
</template>

<script>

import { inject } from 'vue'

export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },

  setup (props) {
    const otherInfo = inject('otherInfo', {})
    const name = inject('name')
    const age = inject('age')
    const updateUserLocation = inject('updateLocation')

    console.log('otherInfo:', otherInfo, 'name:', name.value, 'age:', age.value, typeof updateUserLocation)
    return {
      otherInfo,
      name,
      age
    }
  }

}

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
